package com.cv.infra.controller.system.dynamicThreadPool.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 基础设施 - 动态线程池基本配置信息 Request VO
 *
 * @author Charles_XDXD
 */
@Data
@Schema(description = "基础设施 - 动态线程池基本配置信息 Request VO")
public class DynamicThreadPoolReqVO {

    /**
     * 核心线程数
     */
    @NotNull(message = "核心线程数不能为空")
    @Min(value = 1, message = "核心线程数必须大于等于1")
    @Schema(description = "核心线程数", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
    private Integer corePoolSize;

    /**
     * 最大线程数
     */
    @NotNull(message = "最大线程数不能为空")
    @Min(value = 1, message = "最大线程数必须大于等于1")
    @Schema(description = "最大线程数", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
    private Integer maximumPoolSize;

    /**
     * 队列最大容量
     */
    @NotNull(message = "队列最大容量不能为空")
    @Min(value = 0, message = "队列最大容量必须大于等于0")
    @Schema(description = "队列最大容量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer queueCapacity;

    /**
     * 保持活跃时间
     */
    @NotNull(message = "保持活跃时间不能为空")
    @Min(value = 0, message = "保持活跃时间必须大于等于0")
    @Schema(description = "保持活跃时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "60")
    private Long keepAliveTime;

}